package com.three_learn.star.system.entity;

/* *描述 ：
 *Author:28768
 */

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_dept")
public class sys_dept implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("parent_id")
    private  String parentId;

    @TableField("code")
    private String code;

    @TableField("name")
    private  String name;

    @TableField("level")
    private  Integer level;

    @TableField("ancestors")
    private  String ancestors;

    @TableField("leader")
    private  String leader;

    @TableField("phone")
    private String phone;

    @TableField("email")
    private  String email;

    @TableField("sort")
    private Integer sort;

    @TableField("status")
    private Integer status;

    @TableField("remark")
    private String remark;

    @TableField("create_by")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField("del_flag")
    //配置逻辑删除字段，不删0,删除1
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @TableField("tenant_id")
    private Long tenantId;

    @TableField("update_by")
    private String updateBy;
}
